package com.seawaterbt.ssm.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.seawaterbt.ssm.config.DataSource;
import com.seawaterbt.ssm.config.DataSourceEnum;
import com.seawaterbt.ssm.entity.CzDatHeatstationData;
import com.seawaterbt.ssm.mapper.CzDatHeatstationdataMapper;
import com.seawaterbt.ssm.service.CzDatHeatstationdataService;
import org.springframework.stereotype.Service;

import java.util.Collection;
import java.util.List;

@Service
public class CzDatHeatstationdataServiceImpl extends ServiceImpl<CzDatHeatstationdataMapper, CzDatHeatstationData> implements CzDatHeatstationdataService {


    @DataSource(DataSourceEnum.DB2)
    @Override
    public List<CzDatHeatstationData> listAll() {
        return this.list();
    }
    @DataSource(DataSourceEnum.DB2)
    @Override
    public CzDatHeatstationData getByCodeTime(QueryWrapper wrapper) {
        return this.getOne(wrapper);
    }

    @DataSource(DataSourceEnum.DB2)
    @Override
    public List<CzDatHeatstationData> list(Wrapper<CzDatHeatstationData> queryWrapper) {
        return super.list(queryWrapper);
    }

    @DataSource(DataSourceEnum.DB2)
    @Override
    public boolean saveOrUpdate(CzDatHeatstationData entity) {
        return super.saveOrUpdate(entity);
    }
}
